package com.example.lwy.yuejian11;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class RegisterActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);

        final EditText password_ed = (EditText) findViewById(R.id.regpassword_ed);
        final EditText passworda_ed = (EditText) findViewById(R.id.regpassworda_ed);
        final EditText phone_ed = (EditText) findViewById(R.id.regtelephone_ed);
        final EditText mail_ed = (EditText) findViewById(R.id.regmail_ed);
        Button register_btn = (Button)findViewById(R.id.regregister_btn);
        Button reset_btn = (Button)findViewById(R.id.regreset_btn);
        Button back_btn =(Button)findViewById(R.id.regback_btn);


        reset_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                password_ed.setText("");
                passworda_ed.setText("");
                phone_ed.setText("");
                mail_ed.setText("");
            }
        });

        back_btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(RegisterActivity.this,LoginActivity.class);
                startActivity(intent);
            }
        });

    }
}
